<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>ttt</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
<div id="app">
    {{msg}}
    <button v-on:click="reverseMsg">点我啊</button>
    <button @click="reverseMsg">来点我啊</button>
</div>


<script>
    var app = new Vue({
        el: '#app',
        data: {
            msg: 'hhhdddd',
        },
        methods:{
            reverseMsg() {
                this.msg=this.msg.split("").reverse().join("")
                // this.msg=this.msg.split("")
                // this.msg=this.msg.split("").reverse()
            },

    }
    })

</script>
</body>


</html>
